# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer:
pkgname=vigra
pkgver=1.11.1
pkgrel=11
pkgdesc="An image processing and analysis library"
url="http://ukoethe.github.io/vigra/"
arch="all"
license="MIT"
depends_dev="tiff-dev libjpeg-turbo-dev libpng-dev boost-dev"
makedepends="$depends_dev cmake doxygen py3-setuptools samurai"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/ukoethe/vigra/releases/download/Version-${pkgver//./-}/vigra-$pkgver-src.tar.gz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DDOCINSTALL=share/doc
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build

	# relocate cmake include files
	mkdir -p "$pkgdir"/usr/lib/cmake
	mv "$pkgdir"/usr/lib/vigra "$pkgdir"/usr/lib/cmake
}

sha512sums="
9c1638d626d658fa4b13069e5850b628d91db02bb18b8a9f0a4642fee501ede8a6f4f267d79ca5cd5baf3991e704163345cd18ab7919ff2a93db6bd496096de3  vigra-1.11.1-src.tar.gz
"
